Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency @apollo/client to v3.9.5 - autoclosed #890

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 2, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@apollo/client (source) 3.3.21 -> 3.9.5 age adoption passing confidence

Release Notes

apollographql/apollo-client (@​apollo/client)

v3.9.5

Compare Source

Patch Changes

v3.9.4

Compare Source

Patch Changes

v3.9.3

Compare Source

Patch Changes

v3.9.2

Compare Source

Patch Changes

v3.9.1

Compare Source

Patch Changes

v3.9.0

Compare Source

Minor Changes
Memory optimizations
  • #​11424 62f3b6d Thanks @​phryneas! - Simplify RetryLink, fix potential memory leak

    Historically, RetryLink would keep a values array of all previous values, in case the operation would get an additional subscriber at a later point in time.

    In practice, this could lead to a memory leak (#​11393) and did not serve any further purpose, as the resulting observable would only be subscribed to by Apollo Client itself, and only once - it would be wrapped in a Concast before being exposed to the user, and that Concast would handle subscribers on its own.

  • #​11435 5cce53e Thanks @​phryneas! - Deprecates canonizeResults.

    Using canonizeResults can result in memory leaks so we generally do not recommend using this option anymore. A future version of Apollo Client will contain a similar feature without the risk of memory leaks.

  • #​11254 d08970d Thanks @​benjamn! - Decouple canonicalStringify from ObjectCanon for better time and memory performance.

  • #​11356 cc4ac7e Thanks @​phryneas! - Fix a potential memory leak in FragmentRegistry.transform and FragmentRegistry.findFragmentSpreads that would hold on to passed-in DocumentNodes for too long.

  • #​11370 25e2cb4 Thanks @​phryneas! - parse function: improve memory management

    • use LRU WeakCache instead of Map to keep a limited number of parsed results
    • cache is initiated lazily, only when needed
    • expose parse.resetCache() method
  • #​11389 139acd1 Thanks @​phryneas! - documentTransform: use optimism and WeakCache instead of directly storing data on the Trie

  • #​11358 7d939f8 Thanks @​phryneas! - Fixes a potential memory leak in Concast that might have been triggered when Concast was used outside of Apollo Client.

  • #​11344 bd26676 Thanks @​phryneas! - Add a resetCache method to DocumentTransform and hook InMemoryCache.addTypenameTransform up to InMemoryCache.gc

  • #​11367 30d17bf Thanks @​phryneas! - print: use WeakCache instead of WeakMap

  • #​11387 4dce867 Thanks @​phryneas! - QueryManager.transformCache: use WeakCache instead of WeakMap

  • #​11369 2a47164 Thanks @​phryneas! - Persisted Query Link: improve memory management

    • use LRU WeakCache instead of WeakMap to keep a limited number of hash results
    • hash cache is initiated lazily, only when needed
    • expose persistedLink.resetHashCache() method
    • reset hash cache if the upstream server reports it doesn't accept persisted queries
  • #​10804 221dd99 Thanks @​phryneas! - use WeakMap in React Native with Hermes

  • #​11355 7d8e184 Thanks @​phryneas! - InMemoryCache.gc now also triggers FragmentRegistry.resetCaches (if there is a FragmentRegistry)

  • #​11409 2e7203b Thanks @​phryneas! - Adds an experimental ApolloClient.getMemoryInternals helper

  • #​11343 776631d Thanks @​phryneas! - Add reset method to print, hook up to InMemoryCache.gc

Suspense-enabled data fetching on user interaction with useLoadableQuery
  • #​11300 a815873 Thanks @​jerelmiller! - Introduces a new useLoadableQuery hook. This hook works similarly to useBackgroundQuery in that it returns a queryRef that can be used to suspend a component via the useReadQuery hook. It provides a more ergonomic way to load the query during a user interaction (for example when wanting to preload some data) that would otherwise be clunky with useBackgroundQuery.

    function App() {
      const [loadQuery, queryRef, { refetch, fetchMore, reset }] =
        useLoadableQuery(query, options);
    
      return (
        <>
          <button onClick={() => loadQuery(variables)}>Load query</button>
          <Suspense fallback={<SuspenseFallback />}>
            {queryRef && <Child queryRef={queryRef} />}
          </Suspense>
        </>
      );
    }
    
    function Child({ queryRef }) {
      const { data } = useReadQuery(queryRef);
    
      // ...
    }
Begin preloading outside of React with createQueryPreloader
  • #​11412 58db5c3 Thanks @​jerelmiller! - Add the ability to start preloading a query outside React to begin fetching as early as possible. Call createQueryPreloader to create a preloadQuery function which can be called to start fetching a query. This returns a queryRef which is passed to useReadQuery and suspended until the query is done fetching.
Testing utility improvements
  • #​11178 4d64a6f Thanks @​sebakerckhof! - Support re-using of mocks in the MockedProvider

  • #​6701 8d2b4e1 Thanks @​prowe! - Ability to dynamically match mocks

    Adds support for a new property MockedResponse.variableMatcher: a predicate function that accepts a variables param. If true, the variables will be passed into the ResultFunction to help dynamically build a response.

New useQueryRefHandlers hook
  • #​11412 58db5c3 Thanks @​jerelmiller! - Create a new useQueryRefHandlers hook that returns refetch and fetchMore functions for a given queryRef. This is useful to get access to handlers for a queryRef that was created by createQueryPreloader or when the handlers for a queryRef produced by a different component are inaccessible.

    const MyComponent({ queryRef }) {
      const { refetch, fetchMore } = useQueryRefHandlers(queryRef);
    
      // ...
    }
Bail out of optimisticResponse updates with the IGNORE sentinel object
  • #​11410 07fcf6a Thanks @​sf-twingate! - Allow returning IGNORE sentinel object from optimisticResponse functions to bail-out from the optimistic update.

    Consider this example:

    const UPDATE_COMMENT = gql`
      mutation UpdateComment($commentId: ID!, $commentContent: String!) {
        updateComment(commentId: $commentId, content: $commentContent) {
          id
          __typename
          content
        }
      }
    `;
    
    function CommentPageWithData() {
      const [mutate] = useMutation(UPDATE_COMMENT);
      return (
        <Comment
          updateComment={({ commentId, commentContent }) =>
            mutate({
              variables: { commentId, commentContent },
              optimisticResponse: (vars, { IGNORE }) => {
                if (commentContent === "foo") {
                  // conditionally bail out of optimistic updates
                  return IGNORE;
                }
                return {
                  updateComment: {
                    id: commentId,
                    __typename: "Comment",
                    content: commentContent,
                  },
                };
              },
            })
          }
        />
      );
    }

    The IGNORE sentinel can be destructured from the second parameter in the callback function signature passed to optimisticResponse.

    const preloadQuery = createQueryPreloader(client);
    const queryRef = preloadQuery(QUERY, { variables, ...otherOptions });
    
    function App() {
      return {
        <Suspense fallback={<div>Loading</div>}>
          <MyQuery />
        </Suspense>
      }
    }
    
    function MyQuery() {
      const { data } = useReadQuery(queryRef);
    
      // do something with data
    }
Network adapters for multipart subscriptions usage with Relay and urql
  • #​11301 46ab032 Thanks @​alessbell! - Add multipart subscription network adapters for Relay and urql

    Relay
    import { createFetchMultipartSubscription } from "@&#8203;apollo/client/utilities/subscriptions/relay";
    import { Environment, Network, RecordSource, Store } from "relay-runtime";
    
    const fetchMultipartSubs = createFetchMultipartSubscription(
      "http://localhost:4000",
    );
    
    const network = Network.create(fetchQuery, fetchMultipartSubs);
    
    export const RelayEnvironment = new Environment({
      network,
      store: new Store(new RecordSource()),
    });
    Urql
    import { createFetchMultipartSubscription } from "@&#8203;apollo/client/utilities/subscriptions/urql";
    import { Client, fetchExchange, subscriptionExchange } from "@&#8203;urql/core";
    
    const url = "http://localhost:4000";
    
    const multipartSubscriptionForwarder = createFetchMultipartSubscription(url);
    
    const client = new Client({
      url,
      exchanges: [
        fetchExchange,
        subscriptionExchange({
          forwardSubscription: multipartSubscriptionForwarder,
        }),
      ],
    });
skipPollAttempt callback function
  • #​11397 3f7eecb Thanks @​aditya-kumawat! - Adds a new skipPollAttempt callback function that's called whenever a refetch attempt occurs while polling. If the function returns true, the refetch is skipped and not reattempted until the next poll interval. This will solve the frequent use-case of disabling polling when the window is inactive.

    useQuery(QUERY, {
      pollInterval: 1000,
      skipPollAttempt: () => document.hidden, // or !document.hasFocus()
    });
    // or define it globally
    new ApolloClient({
      defaultOptions: {
        watchQuery: {
          skipPollAttempt: () => document.hidden, // or !document.hasFocus()
        },
      },
    });
QueryManager.inFlightLinkObservables now uses a strong Trie as an internal data structure
  • #​11345 1759066 Thanks @​phryneas!

    Warning: requires @apollo/experimental-nextjs-app-support update

    If you are using @apollo/experimental-nextjs-app-support, you will need to update that to at least 0.5.2, as it accesses this internal data structure.

More Minor Changes

  • #​11202 7c2bc08 Thanks @​benjamn! - Prevent QueryInfo#markResult mutation of result.data and return cache data consistently whether complete or incomplete.

  • #​11442 4b6f2bc Thanks @​jerelmiller! - Remove the need to call retain from useLoadableQuery since useReadQuery will now retain the query. This means that a queryRef that is not consumed by useReadQuery within the given autoDisposeTimeoutMs will now be auto diposed for you.

    Thanks to #​11412, disposed query refs will be automatically resubscribed to the query when consumed by useReadQuery after it has been disposed.

  • #​11438 6d46ab9 Thanks @​jerelmiller! - Remove the need to call retain from useBackgroundQuery since useReadQuery will now retain the query. This means that a queryRef that is not consumed by useReadQuery within the given autoDisposeTimeoutMs will now be auto diposed for you.

    Thanks to #​11412, disposed query refs will be automatically resubscribed to the query when consumed by useReadQuery after it has been disposed.

  • #​11175 d6d1491 Thanks @​phryneas! - To work around issues in React Server Components, especially with bundling for
    the Next.js "edge" runtime we now use an external package to wrap react imports
    instead of importing React directly.

  • #​11495 1190aa5 Thanks @​jerelmiller! - Increase the default memory limits for executeSelectionSet and executeSelectionSetArray.

Patch Changes

  • #​11275 3862f9b Thanks @​phryneas! - Add a defaultContext option and property on ApolloClient, e.g. for keeping track of changing auth tokens or dependency injection.

    This can be used e.g. in authentication scenarios, where a new token might be generated outside of the link chain and should passed into the link chain.

    import { ApolloClient, createHttpLink, InMemoryCache } from "@&#8203;apollo/client";
    import { setContext } from "@&#8203;apollo/client/link/context";
    
    const httpLink = createHttpLink({
      uri: "/graphql",
    });
    
    const authLink = setContext((_, { headers, token }) => {
      return {
        headers: {
          ...headers,
          authorization: token ? `Bearer ${token}` : "",
        },
      };
    });
    
    const client = new ApolloClient({
      link: authLink.concat(httpLink),
      cache: new InMemoryCache(),
    });
    
    // somewhere else in your application
    function onNewToken(newToken) {
      // token can now be changed for future requests without need for a global
      // variable, scoped ref or recreating the client
      client.defaultContext.token = newToken;
    }
  • #​11443 ff5a332 Thanks @​phryneas! - Adds a deprecation warning to the HOC and render prop APIs.

    The HOC and render prop APIs have already been deprecated since 2020,
    but we previously didn't have a @deprecated tag in the DocBlocks.

  • #​11385 d9ca4f0 Thanks @​phryneas! - ensure defaultContext is also used for mutations and subscriptions

  • #​11503 67f62e3 Thanks @​jerelmiller! - Release changes from v3.8.10

  • #​11078 14edebe Thanks @​phryneas! - ObservableQuery: prevent reporting results of previous queries if the variables changed since

  • #​11439 33454f0 Thanks @​jerelmiller! - Address bundling issue introduced in #​11412 where the react/cache internals ended up duplicated in the bundle. This was due to the fact that we had a react/hooks entrypoint that imported these files along with the newly introduced createQueryPreloader function, which lived outside of the react/hooks folder.

  • #​11371 ebd8fe2 Thanks @​phryneas! - Clarify types of EntityStore.makeCacheKey.

v3.8.10

Compare Source

Patch Changes
  • #​11489 abfd02a Thanks @​gronxb! - Fix networkStatus with useSuspenseQuery not properly updating to ready state when using a cache-and-network fetch policy that returns data equal to what is already in the cache.

  • #​11483 6394dda Thanks @​pipopotamasu! - Fix cache override warning output

v3.8.9

Compare Source

Patch Changes

v3.8.8

Compare Source

Patch Changes

v3.8.7

Compare Source

Patch Changes
  • #​11297 c8c76a522 Thanks @​jerelmiller! - Add an explicit return type for the useReadQuery hook called UseReadQueryResult. Previously the return type of this hook was inferred from the return value.

  • #​11337 bb1da8349 Thanks @​phryneas! - #​11206 used the TypeScript syntax infer X extends Y that was introduced in TS 4.8.
    This caused some problems for some users, so we are rolling back to a more backwars-compatible (albeit slightly less performant) type.

v3.8.6

Compare Source

Patch Changes
  • #​11291 2be7eafe3 Thanks @​ArioA! - Fix a bug that allows to only call loadErrorMessages without also calling loadDevErrorMessages.

  • #​11274 b29f000f3 Thanks @​jerelmiller! - Start the query ref auto dispose timeout after the initial promise has settled. This prevents requests that run longer than the timeout duration from keeping the component suspended indefinitely.

  • #​11289 b5894dbf0 Thanks @​phryneas! - MockedProvider: default connectToDevTools to false in created ApolloClient instance.

    This will prevent the mocked ApolloClient instance from trying to connect to the DevTools, which would start a setTimeout that might keep running after a test has finished.

  • #​11206 dd2ce7687 Thanks @​phryneas! - cache.modify: Less strict types & new dev runtime warnings.

v3.8.5

Compare Source

v3.8.4

Compare Source

Patch Changes

v3.8.3

Compare Source

Patch Changes

v3.8.2

Compare Source

Patch Changes
  • #​10072 51045c336 Thanks @​Huulivoide! - Fixes race conditions in useReactiveVar that may prevent updates to the reactive variable from propagating through the hook.

  • #​11162 d9685f53c Thanks @​jerelmiller! - Ensures GraphQL errors returned in subscription payloads adhere to the errorPolicy set in client.subscribe(...) calls.

  • #​11134 96492e142 Thanks @​alessbell! - Use separate type imports in useSuspenseQuery and useBackgroundQuery to workaround SWC compiler issue.

  • #​11117 6b8198109 Thanks @​phryneas! - Adds a new devtools registration mechanism and tweaks the mechanism behind the
    "devtools not found" mechanic.

  • #​11186 f1d429f32 Thanks @​jerelmiller! - Fix an issue where race conditions when rapidly switching between variables would sometimes result in the wrong data returned from the query. Specifically this occurs when a query is triggered with an initial set of variables (VariablesA), then triggers the same query with another set of variables (VariablesB) but switches back to the VariablesA before the response for VariablesB is returned. Previously this would result in the data for VariablesB to be displayed while VariablesA was active. The data is for VariablesA is now properly returned.

  • #​11163 a8a9e11e9 Thanks @​bignimbus! - Fix typo in error message: "occured" -> "occurred"

  • #​11180 7d9c481e5 Thanks @​jerelmiller! - Fixes an issue where refetching from useBackgroundQuery via refetch with an error after an error was already fetched would get stuck in a loading state.

v3.8.1

Compare Source

Patch Changes
  • #​11141 c469b1616 Thanks @​jerelmiller! - Remove newly exported response iterator helpers that caused problems on some installs where @types/node was not available.

    IMPORTANT

    The following exports were added in version 3.8.0 that are removed with this patch.

    • isAsyncIterableIterator
    • isBlob
    • isNodeReadableStream
    • isNodeResponse
    • isReadableStream
    • isStreamableBlob

v3.8.0

Compare Source

Minor Changes
Fetching with Suspense 🎉
  • #​10323 64cb88a4b Thanks @​jerelmiller! - Add support for React suspense with a new useSuspenseQuery hook.

    useSuspenseQuery initiates a network request and causes the component calling it to suspend while the request is in flight. It can be thought of as a drop-in replacement for useQuery that allows you to take advantage of React's concurrent features while fetching during render.

    Consider a Dog component that fetches and renders some information about a dog named Mozzarella:

    View code 🐶
    import { Suspense } from "react";
    import { gql, TypedDocumentNode, useSuspenseQuery } from "@&#8203;apollo/client";
    
    interface Data {
      dog: {
        id: string;
        name: string;
      };
    }
    
    interface Variables {
      name: string;
    }
    
    const GET_DOG_QUERY: TypedDocumentNode<Data, Variables> = gql`
      query GetDog($name: String) {
        dog(name: $name) {
          id
          name
        }
      }
    `;
    
    function App() {
      return (
        <Suspense fallback={<div>Loading...</div>}>
          <Dog name="Mozzarella" />
        </Suspense>
      );
    }
    
    function Dog({ name }: { name: string }) {
      const { data } = useSuspenseQuery(GET_DOG_QUERY, {
        variables: { name },
      });
    
      return <>Name: {data.dog.name}</>;
    }

    For a detailed explanation of useSuspenseQuery, see our fetching with Suspense reference.

  • #​10755 e3c676deb Thanks @​alessbell! - Feature: adds useBackgroundQuery and useReadQuery hooks

    useBackgroundQuery initiates a request for data in a parent component and returns a QueryReference which is used to read the data in a child component via useReadQuery. If the child component attempts to render before the data can be found in the cache, the child component will suspend until the data is available. On cache updates to watched data, the child component calling useReadQuery will re-render with new data but the parent component will not re-render (as it would, for example, if it were using useQuery to issue the request).

    Consider an App component that fetches a list of breeds in the background while also fetching and rendering some information about an individual dog, Mozzarella:

    View code 🐶
    function App() {
      const [queryRef] = useBackgroundQuery(GET_BREEDS_QUERY);
      return (
        <Suspense fallback={<div>Loading...</div>}>
          <Dog name="Mozzarella" queryRef={queryRef} />
        </Suspense>
      );
    }
    
    function Dog({
      name,
      queryRef,
    }: {
      name: string;
      queryRef: QueryReference<BreedData>;
    }) {
      const { data } = useSuspenseQuery(GET_DOG_QUERY, {
        variables: { name },
      });
      return (
        <>
          Name: {data.dog.name}
          <Suspense fallback={<div>Loading breeds...</div>}>
            <Breeds queryRef={queryRef} />
          </Suspense>
        </>
      );
    }
    
    function Breeds({ queryRef }: { queryRef: QueryReference<BreedData> }) {
      const { data } = useReadQuery(queryRef);
      return data.breeds.map(({ characteristics }) =>
        characteristics.map((characteristic) => (
          <div key={characteristic}>{characteristic}</div>
        ))
      );
    }

    For a detailed explanation of useBackgroundQuery and useReadQuery, see our fetching with Suspense reference.

Document transforms 📑
  • #​10509 79df2c7ba Thanks @​jerelmiller! - Add the ability to specify custom GraphQL document transforms. These transforms are run before reading data from the cache, before local state is resolved, and before the query document is sent through the link chain.

    To register a custom document transform, create a transform using the DocumentTransform class and pass it to the documentTransform option on ApolloClient.

    import { DocumentTransform } from "@&#8203;apollo/client";
    
    const documentTransform = new DocumentTransform((document) => {
      // do something with `document`
      return transformedDocument;
    });
    
    const client = new ApolloClient({ documentTransform: documentTransform });

    For more information on the behavior and API of DocumentTransform, see its reference page in our documentation.

New removeTypenameFromVariables link 🔗
  • #​10853 300957960 Thanks @​jerelmiller! - Introduce the new removeTypenameFromVariables link. This link will automatically remove __typename fields from variables for all operations. This link can be configured to exclude JSON-scalars for scalars that utilize __typename.

    This change undoes some work from #​10724 where __typename was automatically stripped for all operations with no configuration. This was determined to be a breaking change and therefore moved into this link.

    For a detailed explanation of removeTypenameFromVariables, see its API reference.

New skipToken sentinel ⏭️
  • #​11112 b4aefcfe9 Thanks @​jerelmiller! - Adds support for a skipToken sentinel that can be used as options in useSuspenseQuery and useBackgroundQuery to skip execution of a query. This works identically to the skip option but is more type-safe and as such, becomes the recommended way to skip query execution. As such, the skip option has been deprecated in favor of skipToken.

    We are considering the removal of the skip option from useSuspenseQuery and useBackgroundQuery in the next major. We are releasing with it now to make migration from useQuery easier and make skipToken more discoverable.

    useSuspenseQuery

    import { skipToken, useSuspenseQuery } from "@&#8203;apollo/client";
    
    const id: number | undefined;
    
    const { data } = useSuspenseQuery(
      query,
      id ? { variables: { id } } : skipToken
    );

    useBackgroundQuery

    import { skipToken, useBackgroundQuery } from "@&#8203;apollo/client";
    
    function Parent() {
      const [queryRef] = useBackgroundQuery(
        query,
        id ? { variables: { id } } : skipToken
      );
    
      return queryRef ? <Child queryRef={queryRef} /> : null;
    }
    
    function Child({ queryRef }: { queryRef: QueryReference<TData> }) {
      const { data } = useReadQuery(queryRef);
    }

    For a detailed explanation of skipToken, see its API reference.

New error extraction mechanism, smaller bundles 📉
  • #​10887 f8c0b965d Thanks @​phryneas! - Add a new mechanism for Error Extraction to reduce bundle size by including error message texts on an opt-in basis.

    By default, errors will link to an error page with the entire error message.
    This replaces "development" and "production" errors and works without
    additional bundler configuration.

    Bundling the text of error messages and development warnings can be enabled as follows:

    import { loadErrorMessages, loadDevMessages } from "@&#8203;apollo/client/dev";
    if (process.env.NODE_ENV !== "production") {
      loadErrorMessages();
      loadDevMessages();
    }

    For a detailed explanation, see our reference on reducing bundle size.

New @nonreactive directive 🎬
  • #​10722 c7e60f83d Thanks @​benjamn! - Implement a @nonreactive directive for selectively skipping reactive comparisons of query result subtrees.

    The @nonreactive directive can be used to mark query fields or fragment spreads and is used to indicate that changes to the data contained within the subtrees marked @nonreactive should not trigger re-rendering. This allows parent components to fetch data to be rendered by their children without re-rendering themselves when the data corresponding with fields marked as @nonreactive change.

    Consider an App component that fetches and renders a list of ski trails:

    View code 🎿
    const TrailFragment = gql`
      fragment TrailFragment on Trail {
        name
        status
      }
    `;
    
    const ALL_TRAILS = gql`
      query allTrails {
        allTrails {
          id
          ...TrailFragment @&#8203;nonreactive
        }
      }
      ${TrailFragment}
    `;
    
    function App() {
      const { data, loading } = useQuery(ALL_TRAILS);
      return (
        <main>
          <h2>Ski Trails</h2>
          <ul>
            {data?.trails.map((trail) => (
              <Trail key={trail.id} id={trail.id} />
            ))}
          </ul>
        </main>
      );
    }

    The Trail component renders a trail's name and status and allows the user to execute a mutation to toggle the status of the trail between "OPEN" and "CLOSED":

    View code 🎿
    const Trail = ({ id }) => {
      const [updateTrail] = useMutation(UPDATE_TRAIL);
      const { data } = useFragment({
        fragment: TrailFragment,
        from: {
          __typename: "Trail",
          id,
        },
      });
      return (
        <li key={id}>
          {data.name} - {data.status}
          <input
            checked={data.status === "OPEN" ? true : false}
            type="checkbox"
            onChange={(e) => {
              updateTrail({
                variables: {
                  trailId: id,
                  status: e.target.checked ? "OPEN" : "CLOSED",
                },
              });
            }}
          />
        </li>
      );
    };

    Notice that the Trail component isn't receiving the entire trail object via props, only the id which is used along with the fragment document to create a live binding for each trail item in the cache. This allows each Trail component to react to the cache updates for a single trail independently. Updates to a trail's status will not cause the parent App component to rerender since the @nonreactive directive is applied to the TrailFragment spread, a fragment that includes the status field.

    For a detailed explanation, see our @nonreactive reference and @​alessbell's post on the Apollo blog about using @nonreactive with useFragment.

Abort the AbortController signal more granularly 🛑
  • #​11040 125ef5b2a Thanks @​phryneas! - HttpLink/BatchHttpLink: Abort the AbortController signal more granularly.

    Before this change, when HttpLink/BatchHttpLink created an AbortController internally, the signal would always be .aborted after the request was completed. This could cause issues with Sentry Session Replay and Next.js App Router Cache invalidations, which just replayed the fetch with the same options - including the cancelled AbortSignal.

    With this change, the AbortController will only be .abort()ed by outside events, not as a consequence of the request completing.

useFragment drops its experimental label 🎓
  • #​10916 ea75e18de Thanks @​alessbell! - Remove experimental labels.

    useFragment, introduced in 3.7.0 as useFragment_experimental, is no longer an experimental API 🎉 We've removed the _experimental suffix from its named export and have made a number of improvements.

    For a detailed explanation, see our useFragment reference and @​alessbell's post on the Apollo blog about using useFragment with @nonreactive for improved performance when rendering lists.

    useFragment improvements
    • #​10765 35f36c5aa Thanks @​phryneas! - More robust types for the data property on UseFragmentResult. When a partial result is given, the type is now correctly set to Partial<TData>.

    • #​11083 f766e8305 Thanks @​phryneas! - Adjust the rerender timing of useQuery to more closely align with useFragment. This means that cache updates delivered to both hooks should trigger renders at relatively the same time. Previously, the useFragment might rerender much faster leading to some confusion.

    • #​10836 6794893c2 Thanks @​phryneas! - Remove the deprecated returnPartialData option from useFragment hook.

More Minor Changes


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@vercel
Copy link

vercel bot commented Feb 2, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
opencollective-pdf ❌ Failed (Inspect) Feb 19, 2024 9:56am

@codecov-commenter
Copy link

Codecov Report

Merging #890 (430a276) into main (4aad6fd) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #890   +/-   ##
=======================================
  Coverage   25.49%   25.49%           
=======================================
  Files           1        1           
  Lines          51       51           
  Branches       21       21           
=======================================
  Hits           13       13           
  Misses         27       27           
  Partials       11       11           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 430a276 to 6be675d Compare February 3, 2023 19:20
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.7.6 fix(deps): update dependency @apollo/client to v3.7.7 Feb 3, 2023
@renovate
Copy link
Contributor Author

renovate bot commented Feb 3, 2023

⚠ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/graphql
npm ERR!   graphql@"14.7.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer graphql@"^15.0.0 || ^16.0.0" from @apollo/[email protected]
npm ERR! node_modules/@apollo/client
npm ERR!   @apollo/client@"3.9.5" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! 
npm ERR! For a full report see:
npm ERR! /tmp/renovate/cache/others/npm/_logs/2024-02-19T09_54_57_295Z-eresolve-report.txt

npm ERR! A complete log of this run can be found in: /tmp/renovate/cache/others/npm/_logs/2024-02-19T09_54_57_295Z-debug-0.log

@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 6be675d to 27e10a3 Compare February 15, 2023 23:57
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.7.7 fix(deps): update dependency @apollo/client to v3.7.8 Feb 15, 2023
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 27e10a3 to e4d7d80 Compare February 20, 2023 17:27
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.7.8 fix(deps): update dependency @apollo/client to v3.7.9 Feb 20, 2023
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from e4d7d80 to 5ca1f2c Compare March 7, 2023 00:52
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.7.9 fix(deps): update dependency @apollo/client to v3.7.10 Mar 7, 2023
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 5ca1f2c to 7362c21 Compare March 31, 2023 19:42
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.7.10 fix(deps): update dependency @apollo/client to v3.7.11 Mar 31, 2023
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 7362c21 to 1df688f Compare April 13, 2023 02:34
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.7.11 fix(deps): update dependency @apollo/client to v3.7.12 Apr 13, 2023
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 1df688f to 4bc1a6e Compare April 27, 2023 12:34
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 4bc1a6e to e7120ca Compare April 28, 2023 00:49
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.7.12 fix(deps): update dependency @apollo/client to v3.7.13 Apr 28, 2023
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from e7120ca to 4680f9a Compare April 28, 2023 07:36
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 4680f9a to f42dd10 Compare April 28, 2023 08:22
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from c282ea5 to 385165c Compare January 18, 2024 18:39
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.8.9 fix(deps): update dependency @apollo/client to v3.8.10 Jan 18, 2024
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 385165c to 4d1367f Compare January 30, 2024 14:55
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 4d1367f to 3c8349a Compare January 30, 2024 22:07
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.8.10 fix(deps): update dependency @apollo/client to v3.9.0 Jan 30, 2024
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 3c8349a to 04ae5b4 Compare January 31, 2024 18:51
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.9.0 fix(deps): update dependency @apollo/client to v3.9.1 Jan 31, 2024
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 04ae5b4 to f45eb3a Compare February 1, 2024 15:58
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.9.1 fix(deps): update dependency @apollo/client to v3.9.2 Feb 1, 2024
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from f45eb3a to e99b8e9 Compare February 6, 2024 21:32
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.9.2 fix(deps): update dependency @apollo/client to v3.9.3 Feb 6, 2024
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from e99b8e9 to 256a5e9 Compare February 7, 2024 18:09
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.9.3 fix(deps): update dependency @apollo/client to v3.9.4 Feb 7, 2024
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 256a5e9 to 7294792 Compare February 15, 2024 19:56
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.9.4 fix(deps): update dependency @apollo/client to v3.9.5 Feb 15, 2024
@renovate renovate bot force-pushed the renovate/apollo-graphql-packages branch from 7294792 to 80027a7 Compare February 19, 2024 09:55
@renovate renovate bot changed the title fix(deps): update dependency @apollo/client to v3.9.5 fix(deps): update dependency @apollo/client to v3.9.5 - autoclosed Feb 19, 2024
@renovate renovate bot closed this Feb 19, 2024
@renovate renovate bot deleted the renovate/apollo-graphql-packages branch February 19, 2024 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant